﻿using System;
using NUnit.Framework;
using ProjetoComperio.Framework.Web.Security.UrlEncrypt;

namespace ProjetoComperio.Test.SystemFramework.Web.Securiy.UrlEncrypt
{
    [TestFixture]
    public class URLEncryptTest
    {

        [Test]
        public void TestEncryptToStringDecryptFromString()
        {
            String originalValue = "Teste1";
            String newValue = URLEncrypt.EncryptToString(originalValue);
            Assert.AreEqual(originalValue, URLEncrypt.DecryptFromString(newValue));
        }
        [Test]
        public void TestEncryptToStringDecryptFromStringUsingEmptyParameter()
        {
            String originalValue = String.Empty;
            String newValue = URLEncrypt.EncryptToString(originalValue);
            Assert.AreEqual(originalValue, URLEncrypt.DecryptFromString(newValue));
        }

    }
}
